package org.example.order.controller;

import lombok.RequiredArgsConstructor;
import org.example.order.service.OrderService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("order")
@RestController
@RequiredArgsConstructor
public class OrderController {
    private final OrderService orderService;

    @PostMapping
    public ResponseEntity<String> createOrder(String skuId, Integer quantity, Long userId) {
        return ResponseEntity.ok(orderService.createOrder(skuId, quantity, userId));
    }
}
